<template>
  <div class="Yyshop-list">
    <el-table :data="LiveInfo">
      <el-table-column label="最近开播" width="200">
        <template #default="scope">
          <div class="date">
            <!-- 日期转换 -->
            <div class="day">{{ formatDay(scope.row.start_time) }}</div>
            <div class="start-end">
              {{
                formatStartOrEndTime(scope.row.start_time, scope.row.end_time)
              }}
            </div>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="直播间信息">
        <template #default="scope">
          <div class="product-wrapper">
            <img class="product-cover" :src="scope.row.feeds_img" alt="" />
            <div class="product-right">
              <div class="product">{{ scope.row.name }}</div>
              <div class="room-id">房间号：{{ scope.row.roomid }}</div>
              <div class="anchor_name">主播：{{ scope.row.anchor_name }}</div>
            </div>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="直播状态" width="180">
        <template #default="scope">
          {{ liveStatus[scope.row.live_status] }}
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template #default="scope">
          <el-button @click="toControl" type="text">控制台</el-button>
          <el-button
            type="text"
            :disabled="
              scope.row.live_status !== 101 ||
              scope.row.live_status !== 102 ||
              scope.row.live_status !== 103
            "
            >分享</el-button
          >
          <el-button
            @click="delLive(scope.row)"
            type="text"
            style="padding-left: 10px"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  setup() {
    return {}
  },
})
</script>

<style scoped></style>
